<%--
 *  File:    ProdEditOther.jsp
 *  @Author: KentZhong 
 *  Date:    11/27/2002 2:09PM
 *
 *  Copyright (C) 2000 - 2003 Oval Technologies, Inc.
 *  All rights reserved. 
 *
 *  This software is the confidential and proprietary information of Oval 
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>


<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java" %>     
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>

<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>

<%
  //init param
  Category cat = Category.getInstance("jsp.ProdEditOther");  
  String privilegeCode = "10203,L203";
  String strModuleName = "PCM";
%>




<%@ include file="/inc/Security.inc" %>
<%@ include file="/inc/PageDefault.inc" %>


<html>
<head>
<title>ProdEditOther</title>
<PageFlow:CheckPageFlow pageName="prodeditother"/>
<%@ include file="/inc/InitEdit.inc" %>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../css/<%= strLanguageCode %>/main.css" type="text/css">
<script language="JavaScript" src="../../js/ScriptLib.js"></script>
<%@ include file="/inc/NewCalendar.inc" %>
<script language="JavaScript">
function page_done()
{
  if(!formatDate(document.thisform))return;
  emptyToNull(document.thisform);
  document.thisform.target="_self";
  document.thisform.actionname.value = "done";
  isRunning = true;
  document.thisform.submit();
}
function page_back()
{
  //parent.location.href="ProdMgmtFrm.jsp?<%= OvalTools.randomURL() %>";
  parent.up.page_goback();
}
</script>
</head>
<%
 Vector details = (Vector)pageContext.getAttribute("details");
  if(details == null) details = new Vector();
    int i=0;
%>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table border=0 cellpadding=0 cellspacing=0 width="100%">
  <tr> 
    <td valign=top> 
      <table border=0 cellpadding=1 cellspacing=0 width="100%">
        <tbody>
        <form name="thisform" method="post" action="../../Dispatcher">
        <input type="hidden" name="pagename" value="prodeditother">
        <input type="hidden" name="actionname">   
        <custom:hidden name="productinfo" property="prodid"/>
        <custom:hidden name="attrinfo"property="productadditionalattributeid" />
         <custom:hidden name="productinfo" property="orgid"/>
        <custom:hidden property="languagecode" scope="session"/>
        <input type="hidden" name="numrows" value="<%=JspHelper.filterNull( details.size() )%>">
          
        <tr> 
          <td bgcolor=#000000 style="PADDING-BOTTOM: 1px; PADDING-LEFT: 1px; PADDING-RIGHT: 1px; PADDING-TOP: 0px"> 
            <table bgcolor=#000000 border=0 cellpadding=0 cellspacing=0 width="100%">
              <tr> 
                <td  bgcolor=#ffffff style="PADDING-BOTTOM: 3px; PADDING-LEFT: 3px; PADDING-RIGHT: 3px; PADDING-TOP: 3px"> 
                  <div id=div1 style="HEIGHT: 450px; OVERFLOW: auto">
                    <table border="1" cellspacing="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" align="center" width="100%" cellpadding="1">
                      <tr> 
                        <td class="td_right" colspan="4"><a onclick="page_done();"><custom:button type="2" label="L_Save" imgsrc="save_btn.gif" border="0"/></a></td>
                      </tr>
                      <tr> 
                        <td class="deepblue-left" colspan="4"><img src="../../images/<%= strLanguageCode %>/quote.gif"> 
                          <%=label.getLabelName("L_AddInfo")+label.getLabelName("L_Colon")%></td>
                      </tr>
                      <tr> 
                        <td class="td-text" width="110"><%=label.getLabelName("L_GTINCode")+label.getLabelName("L_Colon")%></td>
                        <td > 
                          <custom:text name="productinfo" property="gtincode" size="20"/>
                        </td>
                        <td class="td-text" ><%=label.getLabelName("L_NHTSCode")+label.getLabelName("L_Colon")%></td>
                        <td > 
                          <custom:text name="productinfo" property="nhtscode" size="20"/>
                        </td>
                      </tr>
                      <tr> 
                        <td class="td-text"><%=label.getLabelName("L_NECCCode")+label.getLabelName("L_Colon")%></td>
                        <td colspan="3" > 
                          <custom:text name="productinfo" property="necccode" size="20"/>
                        </td>
                      </tr>
                        <!--from table AdditionalCaption-->
                       <tr>
                         <logic:iterate id="onerow" collection="<%= details %>" indexId="idx">
                               <%
                               HashMap  myrow=(HashMap)onerow;
                               int attrtype=((Integer)myrow.get("attrtype")).intValue();
                               boolean isDict = "Y".equals(myrow.get("isdict").toString());
                               String DictType=(String)myrow.get("dicttype");
                               String AttrName=((String)myrow.get("attrname")).trim().toLowerCase();
                               %>

                           <%if(i%2==0){%>

                        <td class="td-text" width="110"><custom:write name="onerow" property="captionname" nbsp="true" /><%= label.getLabelName("L_Colon") %></td>
                         <%if(attrtype==1&&isDict){ %>
                         <td> <custom:selectdic  name="attrinfo" property="<%=AttrName%>" sortOrder="desc" dictType="<%=DictType%>" defaultValue="--------"/></td>
                        <%}if((attrtype==1&&!isDict)||attrtype==2){ %>
                         <td><custom:text name="attrinfo" property="<%=AttrName%>"/></td>

                          <%}if(attrtype==3){%>
                           <td><custom:text name="attrinfo" property="<%=AttrName%>" size="20" dataType="date" dataFormatName="dateformat" module="OGM" label="L_Date" />
                          <a onclick="javascript:c.show(this,'thisform.<%=JspHelper.filterNull(AttrName)%>','<%=JspHelper.filterNull( session.getAttribute("dateformat") )%>')"><custom:button type="3" label="L_Asterisk" imgsrc="Time.gif" border="0"/></a></td>
                             <%}} else {%>

                        <td class="td-text" width="110"><custom:write name="onerow" property="captionname" nbsp="true" /><%= label.getLabelName("L_Colon") %></td>
                          <%if(attrtype==1&&isDict){ %>
                         <td> <custom:selectdic  name="attrinfo" property="<%=AttrName%>" sortOrder="desc" dictType="<%=DictType%>" defaultValue="--------" /></td>
                        <%}if((attrtype==1&&!isDict)||attrtype==2){ %>
                         <td><custom:text name="attrinfo" property="<%=AttrName%>" /></td>
                           <%}if(attrtype==3){%>
                           <td><custom:text name="attrinfo" property="<%=AttrName%>" size="20" dataType="date" dataFormatName="dateformat" module="OGM" label="L_Date" />
                          <a onclick="javascript:c.show(this,'thisform.<%=JspHelper.filterNull(AttrName)%>','<%=JspHelper.filterNull( session.getAttribute("dateformat") )%>')"><custom:button type="3" label="L_Asterisk" imgsrc="Time.gif" border="0"/></a></td>
                            <%}%>
                       </tr><tr>
                             <%}
                         i++;%>

                      </logic:iterate>
                         <%if(i%2==1){%> <td class="td-text">&nbsp</td><td>&nbsp</td><%}%>
                        </tr>
                    </table>
                  </div>
                </td>
              </tr>
            </table>
          </td>
        </tr>
        </tbody>
      </table>
    </td>
  </tr>
  <tr> 
    <td class=summary_top></td>
  </tr>
  <tr> 
    <td class=td_center height="39"><a onclick="page_back();"><custom:button type="1" label="L_Back" imgsrc="back.gif" border="0" style="width:60"/></a></td>
  </tr>
</table>
</body>
</html>


